/**
 * 按钮操作权限处理
 * wh
 */
import {checkPermission} from "@/directive/permission/checkPermission";

export default {
  mounted: function (el, binding) {
    const {value} = binding;
    const hasPermissions = checkPermission(value);
    if (!hasPermissions) {
      el.parentNode && el.parentNode.removeChild(el);
    }
    return hasPermissions;
  }
};
